\(\int \frac {\cos ^4(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx\) [1270]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F(-2)]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 314 \[ \int \frac {\cos ^4(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=\frac {3 a x}{b^4}+\frac {3 \sqrt {a^2-b^2} \left (2 a^2+b^2\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{a^2 b^4 d}-\frac {6 \left (2 a^6-a^4 b^2-b^6\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{a^4 b^4 \sqrt {a^2-b^2} d}+\frac {3 b \text {arctanh}(\cos (c+d x))}{a^4 d}+\frac {\cos (c+d x)}{b^3 d}-\frac {\cot (c+d x)}{a^3 d}-\frac {\left (a^2-b^2\right )^2 \cos (c+d x)}{2 a^2 b^3 d (a+b \sin (c+d x))^2}-\frac {3 \left (a^2-b^2\right ) \cos (c+d x)}{2 a b^3 d (a+b \sin (c+d x))}+\frac {2 \left (a^2-b^2\right ) \left (2 a^2+b^2\right ) \cos (c+d x)}{a^3 b^3 d (a+b \sin (c+d x))} \]

[Out]

3*a*x/b^4+3*b*arctanh(cos(d*x+c))/a^4/d+cos(d*x+c)/b^3/d-cot(d*x+c)/a^3/d-1/2*(a^2-b^2)^2*cos(d*x+c)/a^2/b^3/d
/(a+b*sin(d*x+c))^2-3/2*(a^2-b^2)*cos(d*x+c)/a/b^3/d/(a+b*sin(d*x+c))+2*(a^2-b^2)*(2*a^2+b^2)*cos(d*x+c)/a^3/b
^3/d/(a+b*sin(d*x+c))-6*(2*a^6-a^4*b^2-b^6)*arctan((b+a*tan(1/2*d*x+1/2*c))/(a^2-b^2)^(1/2))/a^4/b^4/d/(a^2-b^
2)^(1/2)+3*(2*a^2+b^2)*arctan((b+a*tan(1/2*d*x+1/2*c))/(a^2-b^2)^(1/2))*(a^2-b^2)^(1/2)/a^2/b^4/d

Rubi [A] (verified)

Time = 0.65 (sec) , antiderivative size = 314, normalized size of antiderivative = 1.00, number of steps used = 20, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.379, Rules used = {2976, 3855, 3852, 8, 2718, 2743, 2833, 12, 2739, 632, 210} \[ \int \frac {\cos ^4(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=\frac {3 b \text {arctanh}(\cos (c+d x))}{a^4 d}-\frac {\cot (c+d x)}{a^3 d}+\frac {3 \left (2 a^2+b^2\right ) \sqrt {a^2-b^2} \arctan \left (\frac {a \tan \left (\frac {1}{2} (c+d x)\right )+b}{\sqrt {a^2-b^2}}\right )}{a^2 b^4 d}-\frac {\left (a^2-b^2\right )^2 \cos (c+d x)}{2 a^2 b^3 d (a+b \sin (c+d x))^2}-\frac {3 \left (a^2-b^2\right ) \cos (c+d x)}{2 a b^3 d (a+b \sin (c+d x))}+\frac {2 \left (2 a^2+b^2\right ) \left (a^2-b^2\right ) \cos (c+d x)}{a^3 b^3 d (a+b \sin (c+d x))}-\frac {6 \left (2 a^6-a^4 b^2-b^6\right ) \arctan \left (\frac {a \tan \left (\frac {1}{2} (c+d x)\right )+b}{\sqrt {a^2-b^2}}\right )}{a^4 b^4 d \sqrt {a^2-b^2}}+\frac {3 a x}{b^4}+\frac {\cos (c+d x)}{b^3 d} \]

[In]

Int[(Cos[c + d*x]^4*Cot[c + d*x]^2)/(a + b*Sin[c + d*x])^3,x]

[Out]

(3*a*x)/b^4 + (3*Sqrt[a^2 - b^2]*(2*a^2 + b^2)*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^2*b^4*d) -
 (6*(2*a^6 - a^4*b^2 - b^6)*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^4*b^4*Sqrt[a^2 - b^2]*d) + (3
*b*ArcTanh[Cos[c + d*x]])/(a^4*d) + Cos[c + d*x]/(b^3*d) - Cot[c + d*x]/(a^3*d) - ((a^2 - b^2)^2*Cos[c + d*x])
/(2*a^2*b^3*d*(a + b*Sin[c + d*x])^2) - (3*(a^2 - b^2)*Cos[c + d*x])/(2*a*b^3*d*(a + b*Sin[c + d*x])) + (2*(a^
2 - b^2)*(2*a^2 + b^2)*Cos[c + d*x])/(a^3*b^3*d*(a + b*Sin[c + d*x]))

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 2739

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[2*(e/d), Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
 NeQ[a^2 - b^2, 0]

Rule 2743

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((a + b*Sin[c + d*x])^(n
+ 1)/(d*(n + 1)*(a^2 - b^2))), x] + Dist[1/((n + 1)*(a^2 - b^2)), Int[(a + b*Sin[c + d*x])^(n + 1)*Simp[a*(n +
 1) - b*(n + 2)*Sin[c + d*x], x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && LtQ[n, -1] && Integ
erQ[2*n]

Rule 2833

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(
b*c - a*d))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(f*(m + 1)*(a^2 - b^2))), x] + Dist[1/((m + 1)*(a^2 - b
^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[(a*c - b*d)*(m + 1) - (b*c - a*d)*(m + 2)*Sin[e + f*x], x], x], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegerQ[2*m]

Rule 2976

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(
m_), x_Symbol] :> Int[ExpandTrig[(d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m*(1 - sin[e + f*x]^2)^(p/2), x], x]
/; FreeQ[{a, b, d, e, f}, x] && NeQ[a^2 - b^2, 0] && IntegersQ[m, 2*n, p/2] && (LtQ[m, -1] || (EqQ[m, -1] && G
tQ[p, 0]))

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {3 a}{b^4}-\frac {3 b \csc (c+d x)}{a^4}+\frac {\csc ^2(c+d x)}{a^3}-\frac {\sin (c+d x)}{b^3}-\frac {\left (a^2-b^2\right )^3}{a^2 b^4 (a+b \sin (c+d x))^3}+\frac {2 \left (2 a^6-3 a^4 b^2+b^6\right )}{a^3 b^4 (a+b \sin (c+d x))^2}-\frac {3 \left (2 a^6-a^4 b^2-b^6\right )}{a^4 b^4 (a+b \sin (c+d x))}\right ) \, dx \\ & = \frac {3 a x}{b^4}+\frac {\int \csc ^2(c+d x) \, dx}{a^3}-\frac {\int \sin (c+d x) \, dx}{b^3}-\frac {(3 b) \int \csc (c+d x) \, dx}{a^4}-\frac {\left (a^2-b^2\right )^3 \int \frac {1}{(a+b \sin (c+d x))^3} \, dx}{a^2 b^4}-\frac {\left (3 \left (2 a^6-a^4 b^2-b^6\right )\right ) \int \frac {1}{a+b \sin (c+d x)} \, dx}{a^4 b^4}+\frac {\left (2 \left (2 a^6-3 a^4 b^2+b^6\right )\right ) \int \frac {1}{(a+b \sin (c+d x))^2} \, dx}{a^3 b^4} \\ & = \frac {3 a x}{b^4}+\frac {3 b \text {arctanh}(\cos (c+d x))}{a^4 d}+\frac {\cos (c+d x)}{b^3 d}-\frac {\left (a^2-b^2\right )^2 \cos (c+d x)}{2 a^2 b^3 d (a+b \sin (c+d x))^2}+\frac {2 \left (a^2-b^2\right ) \left (2 a^2+b^2\right ) \cos (c+d x)}{a^3 b^3 d (a+b \sin (c+d x))}+\frac {\left (a^2-b^2\right )^2 \int \frac {-2 a+b \sin (c+d x)}{(a+b \sin (c+d x))^2} \, dx}{2 a^2 b^4}-\frac {\left (2 \left (2 a^6-3 a^4 b^2+b^6\right )\right ) \int \frac {a}{a+b \sin (c+d x)} \, dx}{a^3 b^4 \left (-a^2+b^2\right )}-\frac {\text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^3 d}-\frac {\left (6 \left (2 a^6-a^4 b^2-b^6\right )\right ) \text {Subst}\left (\int \frac {1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{a^4 b^4 d} \\ & = \frac {3 a x}{b^4}+\frac {3 b \text {arctanh}(\cos (c+d x))}{a^4 d}+\frac {\cos (c+d x)}{b^3 d}-\frac {\cot (c+d x)}{a^3 d}-\frac {\left (a^2-b^2\right )^2 \cos (c+d x)}{2 a^2 b^3 d (a+b \sin (c+d x))^2}-\frac {3 \left (a^2-b^2\right ) \cos (c+d x)}{2 a b^3 d (a+b \sin (c+d x))}+\frac {2 \left (a^2-b^2\right ) \left (2 a^2+b^2\right ) \cos (c+d x)}{a^3 b^3 d (a+b \sin (c+d x))}-\left (2 \left (\frac {1}{a^2}-\frac {2 a^2}{b^4}+\frac {1}{b^2}\right )\right ) \int \frac {1}{a+b \sin (c+d x)} \, dx-\frac {\left (a^2-b^2\right ) \int \frac {2 a^2+b^2}{a+b \sin (c+d x)} \, dx}{2 a^2 b^4}+\frac {\left (12 \left (2 a^6-a^4 b^2-b^6\right )\right ) \text {Subst}\left (\int \frac {1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )}{a^4 b^4 d} \\ & = \frac {3 a x}{b^4}-\frac {6 \left (2 a^6-a^4 b^2-b^6\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{a^4 b^4 \sqrt {a^2-b^2} d}+\frac {3 b \text {arctanh}(\cos (c+d x))}{a^4 d}+\frac {\cos (c+d x)}{b^3 d}-\frac {\cot (c+d x)}{a^3 d}-\frac {\left (a^2-b^2\right )^2 \cos (c+d x)}{2 a^2 b^3 d (a+b \sin (c+d x))^2}-\frac {3 \left (a^2-b^2\right ) \cos (c+d x)}{2 a b^3 d (a+b \sin (c+d x))}+\frac {2 \left (a^2-b^2\right ) \left (2 a^2+b^2\right ) \cos (c+d x)}{a^3 b^3 d (a+b \sin (c+d x))}-\frac {\left (\left (a^2-b^2\right ) \left (2 a^2+b^2\right )\right ) \int \frac {1}{a+b \sin (c+d x)} \, dx}{2 a^2 b^4}-\frac {\left (4 \left (\frac {1}{a^2}-\frac {2 a^2}{b^4}+\frac {1}{b^2}\right )\right ) \text {Subst}\left (\int \frac {1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{d} \\ & = \frac {3 a x}{b^4}-\frac {6 \left (2 a^6-a^4 b^2-b^6\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{a^4 b^4 \sqrt {a^2-b^2} d}+\frac {3 b \text {arctanh}(\cos (c+d x))}{a^4 d}+\frac {\cos (c+d x)}{b^3 d}-\frac {\cot (c+d x)}{a^3 d}-\frac {\left (a^2-b^2\right )^2 \cos (c+d x)}{2 a^2 b^3 d (a+b \sin (c+d x))^2}-\frac {3 \left (a^2-b^2\right ) \cos (c+d x)}{2 a b^3 d (a+b \sin (c+d x))}+\frac {2 \left (a^2-b^2\right ) \left (2 a^2+b^2\right ) \cos (c+d x)}{a^3 b^3 d (a+b \sin (c+d x))}+\frac {\left (8 \left (\frac {1}{a^2}-\frac {2 a^2}{b^4}+\frac {1}{b^2}\right )\right ) \text {Subst}\left (\int \frac {1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )}{d}-\frac {\left (\left (a^2-b^2\right ) \left (2 a^2+b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{a^2 b^4 d} \\ & = \frac {3 a x}{b^4}-\frac {4 \left (\frac {1}{a^2}-\frac {2 a^2}{b^4}+\frac {1}{b^2}\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} d}-\frac {6 \left (2 a^6-a^4 b^2-b^6\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{a^4 b^4 \sqrt {a^2-b^2} d}+\frac {3 b \text {arctanh}(\cos (c+d x))}{a^4 d}+\frac {\cos (c+d x)}{b^3 d}-\frac {\cot (c+d x)}{a^3 d}-\frac {\left (a^2-b^2\right )^2 \cos (c+d x)}{2 a^2 b^3 d (a+b \sin (c+d x))^2}-\frac {3 \left (a^2-b^2\right ) \cos (c+d x)}{2 a b^3 d (a+b \sin (c+d x))}+\frac {2 \left (a^2-b^2\right ) \left (2 a^2+b^2\right ) \cos (c+d x)}{a^3 b^3 d (a+b \sin (c+d x))}+\frac {\left (2 \left (a^2-b^2\right ) \left (2 a^2+b^2\right )\right ) \text {Subst}\left (\int \frac {1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )}{a^2 b^4 d} \\ & = \frac {3 a x}{b^4}-\frac {4 \left (\frac {1}{a^2}-\frac {2 a^2}{b^4}+\frac {1}{b^2}\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} d}-\frac {\sqrt {a^2-b^2} \left (2 a^2+b^2\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{a^2 b^4 d}-\frac {6 \left (2 a^6-a^4 b^2-b^6\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{a^4 b^4 \sqrt {a^2-b^2} d}+\frac {3 b \text {arctanh}(\cos (c+d x))}{a^4 d}+\frac {\cos (c+d x)}{b^3 d}-\frac {\cot (c+d x)}{a^3 d}-\frac {\left (a^2-b^2\right )^2 \cos (c+d x)}{2 a^2 b^3 d (a+b \sin (c+d x))^2}-\frac {3 \left (a^2-b^2\right ) \cos (c+d x)}{2 a b^3 d (a+b \sin (c+d x))}+\frac {2 \left (a^2-b^2\right ) \left (2 a^2+b^2\right ) \cos (c+d x)}{a^3 b^3 d (a+b \sin (c+d x))} \\ \end{align*}

Mathematica [A] (verified)

Time = 5.58 (sec) , antiderivative size = 241, normalized size of antiderivative = 0.77 \[ \int \frac {\cos ^4(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=\frac {\frac {6 a^5 c}{b^4}+\frac {6 a^5 d x}{b^4}+\frac {6 \left (-2 a^6+a^4 b^2-a^2 b^4+2 b^6\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{b^4 \sqrt {a^2-b^2}}-a \cot \left (\frac {1}{2} (c+d x)\right )+6 b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-6 b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {a \cos (c+d x) \left (6 a^5+a^3 b^2-5 a b^4-b \left (-9 a^4+a^2 b^2+4 b^4\right ) \sin (c+d x)+2 a^3 b^2 \sin ^2(c+d x)\right )}{b^3 (a+b \sin (c+d x))^2}+a \tan \left (\frac {1}{2} (c+d x)\right )}{2 a^4 d} \]

[In]

Integrate[(Cos[c + d*x]^4*Cot[c + d*x]^2)/(a + b*Sin[c + d*x])^3,x]

[Out]

((6*a^5*c)/b^4 + (6*a^5*d*x)/b^4 + (6*(-2*a^6 + a^4*b^2 - a^2*b^4 + 2*b^6)*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqr
t[a^2 - b^2]])/(b^4*Sqrt[a^2 - b^2]) - a*Cot[(c + d*x)/2] + 6*b*Log[Cos[(c + d*x)/2]] - 6*b*Log[Sin[(c + d*x)/
2]] + (a*Cos[c + d*x]*(6*a^5 + a^3*b^2 - 5*a*b^4 - b*(-9*a^4 + a^2*b^2 + 4*b^4)*Sin[c + d*x] + 2*a^3*b^2*Sin[c
 + d*x]^2))/(b^3*(a + b*Sin[c + d*x])^2) + a*Tan[(c + d*x)/2])/(2*a^4*d)

Maple [A] (verified)

Time = 1.95 (sec) , antiderivative size = 326, normalized size of antiderivative = 1.04

method result size
derivativedivides \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a^{3}}-\frac {1}{2 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {3 b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{4}}-\frac {2 \left (\frac {-\frac {3 a \,b^{2} \left (a^{4}+a^{2} b^{2}-2 b^{4}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {b \left (4 a^{6}+9 a^{4} b^{2}-3 a^{2} b^{4}-10 b^{6}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {b^{2} a \left (13 a^{4}+a^{2} b^{2}-14 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}-2 a^{6} b -\frac {a^{4} b^{3}}{2}+\frac {5 a^{2} b^{5}}{2}}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}^{2}}+\frac {3 \left (2 a^{6}-a^{4} b^{2}+a^{2} b^{4}-2 b^{6}\right ) \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{2 \sqrt {a^{2}-b^{2}}}\right )}{a^{4} b^{4}}+\frac {\frac {2 b}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+6 a \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{4}}}{d}\) \(326\)
default \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a^{3}}-\frac {1}{2 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {3 b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{4}}-\frac {2 \left (\frac {-\frac {3 a \,b^{2} \left (a^{4}+a^{2} b^{2}-2 b^{4}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {b \left (4 a^{6}+9 a^{4} b^{2}-3 a^{2} b^{4}-10 b^{6}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {b^{2} a \left (13 a^{4}+a^{2} b^{2}-14 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}-2 a^{6} b -\frac {a^{4} b^{3}}{2}+\frac {5 a^{2} b^{5}}{2}}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}^{2}}+\frac {3 \left (2 a^{6}-a^{4} b^{2}+a^{2} b^{4}-2 b^{6}\right ) \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{2 \sqrt {a^{2}-b^{2}}}\right )}{a^{4} b^{4}}+\frac {\frac {2 b}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+6 a \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{4}}}{d}\) \(326\)
risch \(\frac {3 a x}{b^{4}}+\frac {{\mathrm e}^{i \left (d x +c \right )}}{2 b^{3} d}+\frac {{\mathrm e}^{-i \left (d x +c \right )}}{2 b^{3} d}-\frac {i \left (3 i a^{3} b^{3} {\mathrm e}^{5 i \left (d x +c \right )}-24 i a \,b^{5} {\mathrm e}^{3 i \left (d x +c \right )}-4 i a^{3} b^{3} {\mathrm e}^{3 i \left (d x +c \right )}+20 i a^{5} b \,{\mathrm e}^{3 i \left (d x +c \right )}-14 i a^{5} b \,{\mathrm e}^{i \left (d x +c \right )}+i a^{3} b^{3} {\mathrm e}^{i \left (d x +c \right )}+10 a^{6} {\mathrm e}^{4 i \left (d x +c \right )}+3 a^{4} b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-9 a^{2} b^{4} {\mathrm e}^{4 i \left (d x +c \right )}-6 b^{6} {\mathrm e}^{4 i \left (d x +c \right )}+3 i a \,b^{5} {\mathrm e}^{5 i \left (d x +c \right )}+21 i a \,b^{5} {\mathrm e}^{i \left (d x +c \right )}-6 i a^{5} b \,{\mathrm e}^{5 i \left (d x +c \right )}-10 a^{6} {\mathrm e}^{2 i \left (d x +c \right )}-8 a^{4} b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+18 a^{2} b^{4} {\mathrm e}^{2 i \left (d x +c \right )}+12 b^{6} {\mathrm e}^{2 i \left (d x +c \right )}+5 a^{4} b^{2}-a^{2} b^{4}-6 b^{6}\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left (-i b \,{\mathrm e}^{2 i \left (d x +c \right )}+i b +2 a \,{\mathrm e}^{i \left (d x +c \right )}\right )^{2} b^{4} a^{3} d}-\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{a^{4} d}+\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{a^{4} d}-\frac {3 \sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a +\sqrt {-a^{2}+b^{2}}}{b}\right )}{d \,b^{4}}-\frac {3 \sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a +\sqrt {-a^{2}+b^{2}}}{b}\right )}{2 d \,b^{2} a^{2}}-\frac {3 \sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a +\sqrt {-a^{2}+b^{2}}}{b}\right )}{d \,a^{4}}+\frac {3 \sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {-i a +\sqrt {-a^{2}+b^{2}}}{b}\right )}{d \,b^{4}}+\frac {3 \sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {-i a +\sqrt {-a^{2}+b^{2}}}{b}\right )}{2 d \,b^{2} a^{2}}+\frac {3 \sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {-i a +\sqrt {-a^{2}+b^{2}}}{b}\right )}{d \,a^{4}}\) \(747\)

[In]

int(cos(d*x+c)^6*csc(d*x+c)^2/(a+b*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(1/2*tan(1/2*d*x+1/2*c)/a^3-1/2/a^3/tan(1/2*d*x+1/2*c)-3/a^4*b*ln(tan(1/2*d*x+1/2*c))-2/a^4/b^4*((-3/2*a*b
^2*(a^4+a^2*b^2-2*b^4)*tan(1/2*d*x+1/2*c)^3-1/2*b*(4*a^6+9*a^4*b^2-3*a^2*b^4-10*b^6)*tan(1/2*d*x+1/2*c)^2-1/2*
b^2*a*(13*a^4+a^2*b^2-14*b^4)*tan(1/2*d*x+1/2*c)-2*a^6*b-1/2*a^4*b^3+5/2*a^2*b^5)/(tan(1/2*d*x+1/2*c)^2*a+2*b*
tan(1/2*d*x+1/2*c)+a)^2+3/2*(2*a^6-a^4*b^2+a^2*b^4-2*b^6)/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*tan(1/2*d*x+1/2*c)+2
*b)/(a^2-b^2)^(1/2)))+2/b^4*(b/(1+tan(1/2*d*x+1/2*c)^2)+3*a*arctan(tan(1/2*d*x+1/2*c))))

Fricas [A] (verification not implemented)

none

Time = 0.62 (sec) , antiderivative size = 1171, normalized size of antiderivative = 3.73 \[ \int \frac {\cos ^4(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=\text {Too large to display} \]

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^2/(a+b*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

[1/4*(24*a^6*b*d*x*cos(d*x + c)^2 - 24*a^6*b*d*x + 2*(9*a^5*b^2 - a^3*b^4 - 6*a*b^6)*cos(d*x + c)^3 - 3*(4*a^5
*b + 2*a^3*b^3 + 4*a*b^5 - 2*(2*a^5*b + a^3*b^3 + 2*a*b^5)*cos(d*x + c)^2 + (2*a^6 + 3*a^4*b^2 + 3*a^2*b^4 + 2
*b^6 - (2*a^4*b^2 + a^2*b^4 + 2*b^6)*cos(d*x + c)^2)*sin(d*x + c))*sqrt(-a^2 + b^2)*log(((2*a^2 - b^2)*cos(d*x
 + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2 + 2*(a*cos(d*x + c)*sin(d*x + c) + b*cos(d*x + c))*sqrt(-a^2 + b^2))/
(b^2*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2)) - 6*(3*a^5*b^2 - a^3*b^4 - 2*a*b^6)*cos(d*x + c) + 6*(2
*a*b^6*cos(d*x + c)^2 - 2*a*b^6 + (b^7*cos(d*x + c)^2 - a^2*b^5 - b^7)*sin(d*x + c))*log(1/2*cos(d*x + c) + 1/
2) - 6*(2*a*b^6*cos(d*x + c)^2 - 2*a*b^6 + (b^7*cos(d*x + c)^2 - a^2*b^5 - b^7)*sin(d*x + c))*log(-1/2*cos(d*x
 + c) + 1/2) + 2*(6*a^5*b^2*d*x*cos(d*x + c)^2 + 2*a^4*b^3*cos(d*x + c)^3 - 6*(a^7 + a^5*b^2)*d*x - 3*(2*a^6*b
 + a^4*b^3 - 3*a^2*b^5)*cos(d*x + c))*sin(d*x + c))/(2*a^5*b^5*d*cos(d*x + c)^2 - 2*a^5*b^5*d + (a^4*b^6*d*cos
(d*x + c)^2 - (a^6*b^4 + a^4*b^6)*d)*sin(d*x + c)), 1/2*(12*a^6*b*d*x*cos(d*x + c)^2 - 12*a^6*b*d*x + (9*a^5*b
^2 - a^3*b^4 - 6*a*b^6)*cos(d*x + c)^3 - 3*(4*a^5*b + 2*a^3*b^3 + 4*a*b^5 - 2*(2*a^5*b + a^3*b^3 + 2*a*b^5)*co
s(d*x + c)^2 + (2*a^6 + 3*a^4*b^2 + 3*a^2*b^4 + 2*b^6 - (2*a^4*b^2 + a^2*b^4 + 2*b^6)*cos(d*x + c)^2)*sin(d*x
+ c))*sqrt(a^2 - b^2)*arctan(-(a*sin(d*x + c) + b)/(sqrt(a^2 - b^2)*cos(d*x + c))) - 3*(3*a^5*b^2 - a^3*b^4 -
2*a*b^6)*cos(d*x + c) + 3*(2*a*b^6*cos(d*x + c)^2 - 2*a*b^6 + (b^7*cos(d*x + c)^2 - a^2*b^5 - b^7)*sin(d*x + c
))*log(1/2*cos(d*x + c) + 1/2) - 3*(2*a*b^6*cos(d*x + c)^2 - 2*a*b^6 + (b^7*cos(d*x + c)^2 - a^2*b^5 - b^7)*si
n(d*x + c))*log(-1/2*cos(d*x + c) + 1/2) + (6*a^5*b^2*d*x*cos(d*x + c)^2 + 2*a^4*b^3*cos(d*x + c)^3 - 6*(a^7 +
 a^5*b^2)*d*x - 3*(2*a^6*b + a^4*b^3 - 3*a^2*b^5)*cos(d*x + c))*sin(d*x + c))/(2*a^5*b^5*d*cos(d*x + c)^2 - 2*
a^5*b^5*d + (a^4*b^6*d*cos(d*x + c)^2 - (a^6*b^4 + a^4*b^6)*d)*sin(d*x + c))]

Sympy [F(-1)]

Timed out. \[ \int \frac {\cos ^4(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)**6*csc(d*x+c)**2/(a+b*sin(d*x+c))**3,x)

[Out]

Timed out

Maxima [F(-2)]

Exception generated. \[ \int \frac {\cos ^4(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^2/(a+b*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
 for more de

Giac [A] (verification not implemented)

none

Time = 0.37 (sec) , antiderivative size = 461, normalized size of antiderivative = 1.47 \[ \int \frac {\cos ^4(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=\frac {\frac {6 \, {\left (d x + c\right )} a}{b^{4}} - \frac {6 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{4}} + \frac {\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{3}} - \frac {6 \, {\left (2 \, a^{6} - a^{4} b^{2} + a^{2} b^{4} - 2 \, b^{6}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b}{\sqrt {a^{2} - b^{2}}}\right )\right )}}{\sqrt {a^{2} - b^{2}} a^{4} b^{4}} + \frac {2 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 4 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a b^{3}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} a^{4} b^{3}} + \frac {2 \, {\left (3 \, a^{5} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, a b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 9 \, a^{4} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, a^{2} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 10 \, b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 13 \, a^{5} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 14 \, a b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, a^{6} + a^{4} b^{2} - 5 \, a^{2} b^{4}\right )}}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a\right )}^{2} a^{4} b^{3}}}{2 \, d} \]

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^2/(a+b*sin(d*x+c))^3,x, algorithm="giac")

[Out]

1/2*(6*(d*x + c)*a/b^4 - 6*b*log(abs(tan(1/2*d*x + 1/2*c)))/a^4 + tan(1/2*d*x + 1/2*c)/a^3 - 6*(2*a^6 - a^4*b^
2 + a^2*b^4 - 2*b^6)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(a) + arctan((a*tan(1/2*d*x + 1/2*c) + b)/sqrt(a^2 -
 b^2)))/(sqrt(a^2 - b^2)*a^4*b^4) + (2*b^4*tan(1/2*d*x + 1/2*c)^3 - a*b^3*tan(1/2*d*x + 1/2*c)^2 + 4*a^4*tan(1
/2*d*x + 1/2*c) + 2*b^4*tan(1/2*d*x + 1/2*c) - a*b^3)/((tan(1/2*d*x + 1/2*c)^3 + tan(1/2*d*x + 1/2*c))*a^4*b^3
) + 2*(3*a^5*b*tan(1/2*d*x + 1/2*c)^3 + 3*a^3*b^3*tan(1/2*d*x + 1/2*c)^3 - 6*a*b^5*tan(1/2*d*x + 1/2*c)^3 + 4*
a^6*tan(1/2*d*x + 1/2*c)^2 + 9*a^4*b^2*tan(1/2*d*x + 1/2*c)^2 - 3*a^2*b^4*tan(1/2*d*x + 1/2*c)^2 - 10*b^6*tan(
1/2*d*x + 1/2*c)^2 + 13*a^5*b*tan(1/2*d*x + 1/2*c) + a^3*b^3*tan(1/2*d*x + 1/2*c) - 14*a*b^5*tan(1/2*d*x + 1/2
*c) + 4*a^6 + a^4*b^2 - 5*a^2*b^4)/((a*tan(1/2*d*x + 1/2*c)^2 + 2*b*tan(1/2*d*x + 1/2*c) + a)^2*a^4*b^3))/d

Mupad [B] (verification not implemented)

Time = 13.75 (sec) , antiderivative size = 4223, normalized size of antiderivative = 13.45 \[ \int \frac {\cos ^4(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=\text {Too large to display} \]

[In]

int(cos(c + d*x)^6/(sin(c + d*x)^2*(a + b*sin(c + d*x))^3),x)

[Out]

tan(c/2 + (d*x)/2)/(2*a^3*d) + ((tan(c/2 + (d*x)/2)^6*(6*a^4 - 12*b^4 + 5*a^2*b^2))/b^2 - a^2 - (tan(c/2 + (d*
x)/2)^2*(32*b^4 - 42*a^4 + a^2*b^2))/b^2 + (tan(c/2 + (d*x)/2)^4*(48*a^4 - 44*b^4 + 5*a^2*b^2))/b^2 + (2*tan(c
/2 + (d*x)/2)*(6*a^5 - 7*a*b^4 + a^3*b^2))/b^3 + (4*tan(c/2 + (d*x)/2)^3*(6*a^6 - 5*b^6 - 6*a^2*b^4 + 9*a^4*b^
2))/(a*b^3) + (2*tan(c/2 + (d*x)/2)^5*(6*a^6 - 10*b^6 - 5*a^2*b^4 + 9*a^4*b^2))/(a*b^3))/(d*(2*a^5*tan(c/2 + (
d*x)/2)^7 + tan(c/2 + (d*x)/2)^3*(6*a^5 + 8*a^3*b^2) + tan(c/2 + (d*x)/2)^5*(6*a^5 + 8*a^3*b^2) + 2*a^5*tan(c/
2 + (d*x)/2) + 8*a^4*b*tan(c/2 + (d*x)/2)^2 + 16*a^4*b*tan(c/2 + (d*x)/2)^4 + 8*a^4*b*tan(c/2 + (d*x)/2)^6)) +
 (6*a*atan((6480*tan(c/2 + (d*x)/2))/((6480*b^4)/a^4 - (12960*b^2)/a^2 - (5184*b^6)/a^6 + (5184*b^8)/a^8 + (64
80*a*tan(c/2 + (d*x)/2))/b - (5184*b*tan(c/2 + (d*x)/2))/a + (5184*b^3*tan(c/2 + (d*x)/2))/a^3 - (12960*a^3*ta
n(c/2 + (d*x)/2))/b^3 + (6480*a^5*tan(c/2 + (d*x)/2))/b^5 + 6480) - (12960*tan(c/2 + (d*x)/2))/((6480*b^2)/a^2
 + (6480*a^2)/b^2 - (5184*b^4)/a^4 + (5184*b^6)/a^6 - (5184*a*tan(c/2 + (d*x)/2))/b + (5184*b*tan(c/2 + (d*x)/
2))/a + (6480*a^3*tan(c/2 + (d*x)/2))/b^3 - (12960*a^5*tan(c/2 + (d*x)/2))/b^5 + (6480*a^7*tan(c/2 + (d*x)/2))
/b^7 - 12960) - (6480*a)/(6480*b + 6480*a*tan(c/2 + (d*x)/2) - (12960*b^3)/a^2 + (6480*b^5)/a^4 - (5184*b^7)/a
^6 + (5184*b^9)/a^8 - (5184*b^2*tan(c/2 + (d*x)/2))/a - (12960*a^3*tan(c/2 + (d*x)/2))/b^2 + (5184*b^4*tan(c/2
 + (d*x)/2))/a^3 + (6480*a^5*tan(c/2 + (d*x)/2))/b^4) + 5184/((6480*a)/b - 5184*tan(c/2 + (d*x)/2) - (12960*b)
/a + (6480*b^3)/a^3 - (5184*b^5)/a^5 + (5184*b^7)/a^7 + (5184*b^2*tan(c/2 + (d*x)/2))/a^2 + (6480*a^2*tan(c/2
+ (d*x)/2))/b^2 - (12960*a^4*tan(c/2 + (d*x)/2))/b^4 + (6480*a^6*tan(c/2 + (d*x)/2))/b^6) - 5184/(5184*tan(c/2
 + (d*x)/2) - (12960*a)/b + (6480*b)/a - (5184*b^3)/a^3 + (6480*a^3)/b^3 + (5184*b^5)/a^5 - (5184*a^2*tan(c/2
+ (d*x)/2))/b^2 + (6480*a^4*tan(c/2 + (d*x)/2))/b^4 - (12960*a^6*tan(c/2 + (d*x)/2))/b^6 + (6480*a^8*tan(c/2 +
 (d*x)/2))/b^8) + (6480*tan(c/2 + (d*x)/2))/((5184*b^4)/a^4 - (12960*a^2)/b^2 - (5184*b^2)/a^2 + (6480*a^4)/b^
4 + (5184*a*tan(c/2 + (d*x)/2))/b - (5184*a^3*tan(c/2 + (d*x)/2))/b^3 + (6480*a^5*tan(c/2 + (d*x)/2))/b^5 - (1
2960*a^7*tan(c/2 + (d*x)/2))/b^7 + (6480*a^9*tan(c/2 + (d*x)/2))/b^9 + 6480) + (12960*a^3)/(6480*b^3 - (12960*
b^5)/a^2 + (6480*b^7)/a^4 - (5184*b^9)/a^6 + (5184*b^11)/a^8 - 12960*a^3*tan(c/2 + (d*x)/2) + 6480*a*b^2*tan(c
/2 + (d*x)/2) - (5184*b^4*tan(c/2 + (d*x)/2))/a + (6480*a^5*tan(c/2 + (d*x)/2))/b^2 + (5184*b^6*tan(c/2 + (d*x
)/2))/a^3) - (6480*a^5)/(6480*b^5 - (12960*b^7)/a^2 + (6480*b^9)/a^4 - (5184*b^11)/a^6 + (5184*b^13)/a^8 + 648
0*a^5*tan(c/2 + (d*x)/2) + 6480*a*b^4*tan(c/2 + (d*x)/2) - 12960*a^3*b^2*tan(c/2 + (d*x)/2) - (5184*b^6*tan(c/
2 + (d*x)/2))/a + (5184*b^8*tan(c/2 + (d*x)/2))/a^3) - (5184*b*tan(c/2 + (d*x)/2))/((6480*a^2)/b - 5184*b + (5
184*b^3)/a^2 - (12960*a^4)/b^3 + (6480*a^6)/b^5 + (5184*a^3*tan(c/2 + (d*x)/2))/b^2 - (5184*a^5*tan(c/2 + (d*x
)/2))/b^4 + (6480*a^7*tan(c/2 + (d*x)/2))/b^6 - (12960*a^9*tan(c/2 + (d*x)/2))/b^8 + (6480*a^11*tan(c/2 + (d*x
)/2))/b^10) + (5184*b^3*tan(c/2 + (d*x)/2))/(5184*b^3 - 5184*a^2*b + (6480*a^4)/b - (12960*a^6)/b^3 + (6480*a^
8)/b^5 + (5184*a^5*tan(c/2 + (d*x)/2))/b^2 - (5184*a^7*tan(c/2 + (d*x)/2))/b^4 + (6480*a^9*tan(c/2 + (d*x)/2))
/b^6 - (12960*a^11*tan(c/2 + (d*x)/2))/b^8 + (6480*a^13*tan(c/2 + (d*x)/2))/b^10)))/(b^4*d) - (3*b*log(tan(c/2
 + (d*x)/2)))/(a^4*d) + (atan((((-(a + b)*(a - b))^(1/2)*(2*a^4 + 2*b^4 + a^2*b^2)*((8*tan(c/2 + (d*x)/2)*(108
*b^19 - 108*a^2*b^17 + 135*a^4*b^15 - 270*a^6*b^13 + 1863*a^8*b^11 - 1836*a^10*b^9 + 864*a^12*b^7 - 1080*a^14*
b^5 + 432*a^16*b^3))/(a^9*b^12) - (8*(378*a^14 + 108*a^4*b^10 - 108*a^6*b^8 - 729*a^8*b^6 + 378*a^10*b^4 - 135
*a^12*b^2))/(a^8*b^8) + (3*(-(a + b)*(a - b))^(1/2)*((8*(144*a^2*b^15 - 108*a^4*b^13 + 90*a^6*b^11 - 126*a^8*b
^9 + 144*a^12*b^5 - 108*a^14*b^3))/(a^8*b^8) + (8*tan(c/2 + (d*x)/2)*(36*a^4*b^18 - 180*a^6*b^16 + 405*a^8*b^1
4 - 306*a^10*b^12 + 909*a^12*b^10 - 900*a^14*b^8 + 72*a^16*b^6))/(a^9*b^12) + (3*(-(a + b)*(a - b))^(1/2)*((8*
(96*a^6*b^14 - 72*a^8*b^12 + 30*a^10*b^10 - 42*a^12*b^8))/(a^8*b^8) + (8*tan(c/2 + (d*x)/2)*(192*a^6*b^19 - 20
4*a^8*b^17 + 96*a^10*b^15 - 120*a^12*b^13 + 48*a^14*b^11))/(a^9*b^12) + (3*(-(a + b)*(a - b))^(1/2)*((8*(16*a^
10*b^13 - 12*a^12*b^11))/(a^8*b^8) + (8*tan(c/2 + (d*x)/2)*(64*a^10*b^18 - 68*a^12*b^16 + 8*a^14*b^14))/(a^9*b
^12))*(2*a^4 + 2*b^4 + a^2*b^2))/(2*a^4*b^4))*(2*a^4 + 2*b^4 + a^2*b^2))/(2*a^4*b^4))*(2*a^4 + 2*b^4 + a^2*b^2
))/(2*a^4*b^4))*3i)/(2*a^4*b^4) - ((-(a + b)*(a - b))^(1/2)*(2*a^4 + 2*b^4 + a^2*b^2)*((8*(378*a^14 + 108*a^4*
b^10 - 108*a^6*b^8 - 729*a^8*b^6 + 378*a^10*b^4 - 135*a^12*b^2))/(a^8*b^8) - (8*tan(c/2 + (d*x)/2)*(108*b^19 -
 108*a^2*b^17 + 135*a^4*b^15 - 270*a^6*b^13 + 1863*a^8*b^11 - 1836*a^10*b^9 + 864*a^12*b^7 - 1080*a^14*b^5 + 4
32*a^16*b^3))/(a^9*b^12) + (3*(-(a + b)*(a - b))^(1/2)*((8*(144*a^2*b^15 - 108*a^4*b^13 + 90*a^6*b^11 - 126*a^
8*b^9 + 144*a^12*b^5 - 108*a^14*b^3))/(a^8*b^8) + (8*tan(c/2 + (d*x)/2)*(36*a^4*b^18 - 180*a^6*b^16 + 405*a^8*
b^14 - 306*a^10*b^12 + 909*a^12*b^10 - 900*a^14*b^8 + 72*a^16*b^6))/(a^9*b^12) - (3*(-(a + b)*(a - b))^(1/2)*(
(8*(96*a^6*b^14 - 72*a^8*b^12 + 30*a^10*b^10 - 42*a^12*b^8))/(a^8*b^8) + (8*tan(c/2 + (d*x)/2)*(192*a^6*b^19 -
 204*a^8*b^17 + 96*a^10*b^15 - 120*a^12*b^13 + 48*a^14*b^11))/(a^9*b^12) - (3*(-(a + b)*(a - b))^(1/2)*((8*(16
*a^10*b^13 - 12*a^12*b^11))/(a^8*b^8) + (8*tan(c/2 + (d*x)/2)*(64*a^10*b^18 - 68*a^12*b^16 + 8*a^14*b^14))/(a^
9*b^12))*(2*a^4 + 2*b^4 + a^2*b^2))/(2*a^4*b^4))*(2*a^4 + 2*b^4 + a^2*b^2))/(2*a^4*b^4))*(2*a^4 + 2*b^4 + a^2*
b^2))/(2*a^4*b^4))*3i)/(2*a^4*b^4))/((16*(1134*a^10*b + 324*b^11 - 324*a^2*b^9 - 891*a^4*b^7 + 162*a^6*b^5 - 4
05*a^8*b^3))/(a^8*b^8) + (16*tan(c/2 + (d*x)/2)*(2592*a^16 + 1296*a^8*b^8 - 3240*a^10*b^6 + 1944*a^12*b^4 - 25
92*a^14*b^2))/(a^9*b^12) - (3*(-(a + b)*(a - b))^(1/2)*(2*a^4 + 2*b^4 + a^2*b^2)*((8*tan(c/2 + (d*x)/2)*(108*b
^19 - 108*a^2*b^17 + 135*a^4*b^15 - 270*a^6*b^13 + 1863*a^8*b^11 - 1836*a^10*b^9 + 864*a^12*b^7 - 1080*a^14*b^
5 + 432*a^16*b^3))/(a^9*b^12) - (8*(378*a^14 + 108*a^4*b^10 - 108*a^6*b^8 - 729*a^8*b^6 + 378*a^10*b^4 - 135*a
^12*b^2))/(a^8*b^8) + (3*(-(a + b)*(a - b))^(1/2)*((8*(144*a^2*b^15 - 108*a^4*b^13 + 90*a^6*b^11 - 126*a^8*b^9
 + 144*a^12*b^5 - 108*a^14*b^3))/(a^8*b^8) + (8*tan(c/2 + (d*x)/2)*(36*a^4*b^18 - 180*a^6*b^16 + 405*a^8*b^14
- 306*a^10*b^12 + 909*a^12*b^10 - 900*a^14*b^8 + 72*a^16*b^6))/(a^9*b^12) + (3*(-(a + b)*(a - b))^(1/2)*((8*(9
6*a^6*b^14 - 72*a^8*b^12 + 30*a^10*b^10 - 42*a^12*b^8))/(a^8*b^8) + (8*tan(c/2 + (d*x)/2)*(192*a^6*b^19 - 204*
a^8*b^17 + 96*a^10*b^15 - 120*a^12*b^13 + 48*a^14*b^11))/(a^9*b^12) + (3*(-(a + b)*(a - b))^(1/2)*((8*(16*a^10
*b^13 - 12*a^12*b^11))/(a^8*b^8) + (8*tan(c/2 + (d*x)/2)*(64*a^10*b^18 - 68*a^12*b^16 + 8*a^14*b^14))/(a^9*b^1
2))*(2*a^4 + 2*b^4 + a^2*b^2))/(2*a^4*b^4))*(2*a^4 + 2*b^4 + a^2*b^2))/(2*a^4*b^4))*(2*a^4 + 2*b^4 + a^2*b^2))
/(2*a^4*b^4)))/(2*a^4*b^4) - (3*(-(a + b)*(a - b))^(1/2)*(2*a^4 + 2*b^4 + a^2*b^2)*((8*(378*a^14 + 108*a^4*b^1
0 - 108*a^6*b^8 - 729*a^8*b^6 + 378*a^10*b^4 - 135*a^12*b^2))/(a^8*b^8) - (8*tan(c/2 + (d*x)/2)*(108*b^19 - 10
8*a^2*b^17 + 135*a^4*b^15 - 270*a^6*b^13 + 1863*a^8*b^11 - 1836*a^10*b^9 + 864*a^12*b^7 - 1080*a^14*b^5 + 432*
a^16*b^3))/(a^9*b^12) + (3*(-(a + b)*(a - b))^(1/2)*((8*(144*a^2*b^15 - 108*a^4*b^13 + 90*a^6*b^11 - 126*a^8*b
^9 + 144*a^12*b^5 - 108*a^14*b^3))/(a^8*b^8) + (8*tan(c/2 + (d*x)/2)*(36*a^4*b^18 - 180*a^6*b^16 + 405*a^8*b^1
4 - 306*a^10*b^12 + 909*a^12*b^10 - 900*a^14*b^8 + 72*a^16*b^6))/(a^9*b^12) - (3*(-(a + b)*(a - b))^(1/2)*((8*
(96*a^6*b^14 - 72*a^8*b^12 + 30*a^10*b^10 - 42*a^12*b^8))/(a^8*b^8) + (8*tan(c/2 + (d*x)/2)*(192*a^6*b^19 - 20
4*a^8*b^17 + 96*a^10*b^15 - 120*a^12*b^13 + 48*a^14*b^11))/(a^9*b^12) - (3*(-(a + b)*(a - b))^(1/2)*((8*(16*a^
10*b^13 - 12*a^12*b^11))/(a^8*b^8) + (8*tan(c/2 + (d*x)/2)*(64*a^10*b^18 - 68*a^12*b^16 + 8*a^14*b^14))/(a^9*b
^12))*(2*a^4 + 2*b^4 + a^2*b^2))/(2*a^4*b^4))*(2*a^4 + 2*b^4 + a^2*b^2))/(2*a^4*b^4))*(2*a^4 + 2*b^4 + a^2*b^2
))/(2*a^4*b^4)))/(2*a^4*b^4)))*(-(a + b)*(a - b))^(1/2)*(2*a^4 + 2*b^4 + a^2*b^2)*3i)/(a^4*b^4*d)